import { createRouter, createWebHashHistory, Router } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'
// import routes from './routes'

/**
 * 路由实例
 */
// const router: Router = createRouter({
//   history: createWebHashHistory(),
//   routes: [
//     {
//       path: '/:pathMatch(.*)*',
//       redirect: {
//         name: 'layout'
//       }
//     },
//     {
//       path: '/',
//       name: 'layout',
//       redirect: {
//         name: 'dashboard'
//       },
//       component: () => import(`@/views/layout/index.vue`),
//       children: routes as unknown as RouteRecordRaw[]
//     }
//   ]
// })

const router: Router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name:'dashboard',
      component:()=> import('@/views/dashboard/index.vue')
    },
    {
      path: '/classlist',
      name: 'classlist',
      component: () =>  import('@/views/classlist/index.vue')
    },
    {
      path:'/thestart',
      name: 'thestart',
      component:()=> import('@/views/thestart/index.vue')
    }
  ]
})

export default router
